package com.juku2024.juku.adapter

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.juku2024.juku.R
import com.juku2024.juku.model.EpisodeGroupModel
import java.util.*


class EpisodeGroupAdapter(data: ArrayList<EpisodeGroupModel>) : BaseQuickAdapter<EpisodeGroupModel, BaseViewHolder>(R.layout.item_auto_search, data) {

    override fun convert(holder: BaseViewHolder, item: EpisodeGroupModel) {
        holder.setText(R.id.tvMateKey, "${item.start + 1} - ${item.end}" )
        if (item.isSelected) {
            holder.setTextColorRes(R.id.tvMateKey, R.color.color_text_light)
        } else {
            holder.setTextColorRes(R.id.tvMateKey, R.color.cf1f1f1)
        }
    }

}